home *** CD-ROM | disk | FTP | other *** search
- if(!setVars)
- {
- oldX = _root._xmouse;
- _root.setFrame(this);
- oMoveSpeed = 4;
- if(!_root.moveSpeed)
- {
- moveSpeed = oMoveSpeed;
- }
- else
- {
- moveSpeed = _root.moveSpeed;
- }
- xPos = _X;
- friction = 20;
- minX = 50;
- maxX = Stage.width - 50;
- var noPress;
- bbarws = bbar.bar._width;
- setVars = true;
- }
- onEnterFrame = function()
- {
- _root.checkFrame(this);
- if(!_root.moveSpeed)
- {
- moveSpeed = oMoveSpeed;
- }
- else
- {
- moveSpeed = _root.moveSpeed;
- }
- if(_root.mw == "mouse")
- {
- if(_root._xmouse > oldX)
- {
- f1._visible = true;
- f1._alpha += 10;
- f1.play();
- xPos = _root._xmouse;
- }
- else
- {
- f1.gotoAndStop(21);
- f1._alpha -= 10;
- }
- if(_root._xmouse < oldX)
- {
- f2._visible = true;
- f2._alpha += 10;
- f2.play();
- xPos = _root._xmouse;
- }
- else
- {
- f2.gotoAndStop(21);
- f2._alpha -= 10;
- }
- oldX = _root._xmouse;
- }
- else
- {
- if(Key.isDown(39))
- {
- f1._visible = true;
- f1._alpha += 10;
- f1.play();
- xPos += moveSpeed;
- }
- else
- {
- f1.gotoAndStop(21);
- f1._alpha -= 10;
- }
- if(Key.isDown(37))
- {
- f2._visible = true;
- f2._alpha += 10;
- f2.play();
- xPos -= moveSpeed;
- }
- else
- {
- f2.gotoAndStop(21);
- f2._alpha -= 10;
- }
- }
- _X = _X + (xPos - _X) / friction;
- if(_X > maxX)
- {
- _X = maxX - 1;
- xPos = _X;
- }
- if(_X < minX)
- {
- _X = minX + 1;
- xPos = _X;
- }
- keyNum = 65;
- while(keyNum < 90)
- {
- if(Key.isDown(keyNum))
- {
- if(_root.nextShot >= 100)
- {
- _root.nextShot = 0;
- _root.depth = _root.depth + 1;
- _root.attachMovie("bullet","bullet" + _root.depth,_root.depth);
- eval("_root.bullet" + _root.depth).moveSpeed = 3;
- eval("_root.bullet" + _root.depth).letternum = keyNum + 1;
- eval("_root.bullet" + _root.depth)._alpha = 50;
- eval("_root.bullet" + _root.depth)._x = _X;
- eval("_root.bullet" + _root.depth)._y = _Y - 20;
- eval("_root.bullet" + _root.depth)._width = _root.bubblesize;
- eval("_root.bullet" + _root.depth)._height = _root.bubblesize;
- }
- }
- keyNum++;
- }
- if(_root.rapidcount > 0)
- {
- plus = 20;
- }
- else
- {
- plus = 5;
- }
- if(_root.nextShot < 100)
- {
- _root.nextShot += plus;
- }
- if(_root.nextShot > 100)
- {
- _root.nextShot = 100;
- }
- if(_root.nextShot < 0)
- {
- _root.nextShot = 0;
- }
- bbar.bar._width = _root.nextShot * bbarws / 100;
- };
-